package Exam;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @Author Kechelle
 * @Date 2020/9/26 19:34
 * @Version 1.0
 */
public class ClassTwo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int m = scanner.nextInt();
        int[] nums = new int[m];
        String res = scanner.next();
        String[] strs = res.split(",");
        for (int i=0;i<m;i++){
            nums[i] = Integer.parseInt(strs[i]);
        }
        QuickSort(nums,0,nums.length-1);
        StringBuilder builder = new StringBuilder();
        for (int num:nums){
            builder.append(num).append(",");
        }
        System.out.println(builder.substring(0, builder.lastIndexOf(",")));
    }

    public static void QuickSort(int[] nums,int left,int right){
        if (left<right){
            int i = left;
            int j = right;
            int key = nums[left];
            while (i<j){
                while (i<j && nums[j]>key) j--;
                while (i<j && nums[i]<key) i++;
                //找到比key大的或小的，交互位置
                if (i<j){
                    int temp = nums[i];
                    nums[i] = nums[j];
                    nums[j] = temp;
                }
            }
            //基数回归中间
            nums[i] = key;
            QuickSort(nums,left,i-1);
            QuickSort(nums,i+1,right);
        }
    }
}
